<template>
    <div>
        <h1>我的订单</h1>
        <table>
            <tr>
                <td>会员id</td>
                <td>商品标题</td>
                <td>价格</td>
                <td>姓名</td>
                <td>手机号码</td>
            </tr>
            <tr v-for="order in order_list" :key="order.id">
                <td>{{ order.user_id }}</td>
                <td>{{ order.title }}</td>
                <td>{{ order.price }}</td>
                <td>{{ order.name }}</td>
                <td>{{ order.phone }}</td>
            </tr>
        </table>
    </div>
</template>

<script>
export default {
    data(){
        return {
            order_list:[],
        }
    },
    created(){
        this.axios.get('/order').then(resp=>{
            console.log(resp.data)
            this.order_list = resp.data
        }).catch(error=>{
            console.log(error)
        })
    },
}
</script>

<style>

</style>